﻿#pragma warning(disable: 4996)
#pragma warning(disable: 6031)

/*
*/

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

typedef struct TContext_s
{
	int n;
	double eps;
}TContext;

TContext context;

void read_data(TContext* ctx)
{
	scanf("%d", &ctx->n);
	ctx->eps = 0.0000001;
}

void dump(TContext* ctx)
{
}

void sum_N(TContext* ctx)
{
	double sum = 1;
	for (int i = 2; i <= ctx->n; ++i)
	{
		sum += 1.0 / i;
	}
	printf("sum = %.6lf\n", sum);
}

void solve(TContext* ctx)
{
	read_data(ctx);
	sum_N(ctx);
}

int main()
{
	freopen("D:/Develop/GitRepos/MOOC/浙江大学/数据结构/201906/DataStructure/M2019秋C入门和进阶练习集/7-94.txt", "r", stdin);
	solve(&context);
	return 0;
}
